home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.20000824-20010305 / 000155_news@columbia.edu _Thu Dec 28 19:12:35 2000.msg < prev    next >
Internet Message Format  |  2001-03-05  |  5KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by fozimane.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id TAA15203
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Thu, 28 Dec 2000 19:12:34 -0500 (EST)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id TAA21274
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 28 Dec 2000 19:12:34 -0500 (EST)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id TAA06508
  10.     for kermit.misc@watsun.cc.columbia.edu; Thu, 28 Dec 2000 19:03:14 -0500 (EST)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: jrd@cc.usu.edu (Joe Doupnik)
  13. Subject: Re: A wish for the FTP-client
  14. Message-ID: <vbf4gv18JU5Z@cc.usu.edu>
  15. Date: 28 Dec 00 16:36:12 MDT
  16. Organization: Utah State University
  17. To: kermit.misc@columbia.edu
  18.  
  19. In article <92gdsu$26u$1@newsmaster.cc.columbia.edu>, fdc@watsun.cc.columbia.edu (Frank da Cruz) writes:
  20. > In article <5VP2SCqS3328@cc.usu.edu>, Joe Doupnik <jrd@cc.usu.edu> wrote:
  21. > : In article <92g92f$s9j$1@newsmaster.cc.columbia.edu>,
  22. > : fdc@watsun.cc.columbia.edu (Frank da Cruz) writes:
  23. > : >    "...
  24. > : >    mktime() normalizes  the supplied tm structure" -- applies timezone
  25. > : >    conversions, etc.  The problem there is, of course, we don't know, and
  26. > : >    have no way to find out, the server's timezone, and even if we knew it,
  27. > : >    what the rules are to convert to our own.  The struct tm is *already* in
  28. > : >    GMT/UTC, and should not be converted to it again.
  29. > : > 
  30. > : > Thus the resulting file date won't be what you want.  I think the object
  31. > : > of copying the server's MDTM is so update can work in both directions.  If
  32. > : > we use mktime(), I think the result will have up to 24 hours of randomness
  33. > : > added or subtracted.  Am I missing something?
  34. > :
  35. > :     I face this problem daily, at 0300 during mirroring operations. As
  36. > : Frank notes well, TZ material makes a mess of trying to reproduce UTC stamps
  37. > : from FTP information. What I do, and what works reasonably well, is use what
  38. > : FTP itself reports in a LIST command (parse according to remote server
  39. > : syntax) which is what it thinks the local time/date of the file is. I then
  40. > : make the client side report the same time/date at user level. This makes
  41. > : local and remote systems "appear" to yield identical file listings.
  42. > :
  43. > Given the ability to parse an "ls -l" listing, this approach works great when
  44. > (a) client and server are in the same timezone, or (b) the client knows what
  45. > timezone the server is in and knows how to "pre-unadjust".  But in the
  46. > general case, the client has no clue as to the server's timezone or daylight
  47. > savings rules, and therefore hasn't a prayer of compensating for mktime()'s
  48. > adjustments.  Also, parsing LIST responses is not a general solution since
  49. > the server might not be UNIX, or might be running some kind of "improved"
  50. > ls, or whatever.
  51. > In truth, FTP protocol and UNIX APIs leave a lot to be desired, especially
  52. > when the holes coincide.
  53. > - Frank
  54. ---------
  55.     Which is what I thought I was saying too. FTP is setup to deal with
  56. user level things, which means seeing time/date in local form rather than as
  57. UTC. And it means viewing LIST command output in the format chosen by the
  58. server machine (and that format can be anything). These are all for the eyes
  59. of humans, as is the result of "quote MDTM filename." It's not holes so much
  60. as by design, and designed with good sense to realize that dissimilar o/s'
  61. are horribly mismatched in file system details and TZ material is worse yet.
  62.     Folks do have the impression that file systems can be merged in some
  63. sense so that client and server share the same nuances of what a file is.
  64. Alas, we know that problem is a total mess in the general case. That is why
  65. I mentioned the file export/import RPC business because the nuances are
  66. better preserved and translated in that machine-level work than in user-level
  67. FTP work. Clearly, better does not mean perfect, often very far from perfect.
  68.     So, we come down to asking what is more important: the file contents
  69. and its name (or a close approximation), or that plus all the metadata about
  70. what the file is. Most of us are happy with the first choice, and for that FTP
  71. does work reasonably well (and hence the FTP support in CKermit does fine).
  72. And hopefully we can quietly forget about files which are not simple sequences
  73. of bytes. 
  74.     Joe D.